//
//  NetWorkBaseDao.h
//  singleTarget
//
//  Created by   李小云 on 17/9/21.
//  Copyright © 2017年   李小云. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "NetWorkTools.h"
#import "NetWorkRequestModel.h"

static const NSString *  KEYS_USERNAME_PASSWORD = @"com.company.app.usernamepassword";
static const NSString *  KEYS_USERNAME = @"com.company.app.username";
static const NSString *  KEYS_PASSWORD = @"com.company.app.password";


//网络请求返回类型
typedef NS_ENUM(NSInteger, NetWorkRequetType) {
    NetWorkRequest_Success =0, //成功
    NetWorkRequest_Fail,//失败
    NetWorkRequest_EmptyData,//空数据
    NetWorkRequest_Delete =0,//数据被删除
    NetWorkRequest_NoneNet =0//网络失联
};

@interface NetWorkBaseDao : NSObject


- (NSURLSessionTask *)httpRequestGetDataWithUrl:(NSString *)urlStr
                           params:(NSDictionary *)params
                       cacheBlock:(NetWorkCachesRequest)cacheBlock
                     successBlock:(NetWorkSuccessRequest)successBlock
                        failBlock:(NetWorkFailRequest)failBlock;

- (NSURLSessionTask *)httpRequestPostDataWithUrl:(NSString *)urlStr
                           params:(NSDictionary *)params
                       cacheBlock:(NetWorkCachesRequest)cacheBlock
                     successBlock:(NetWorkSuccessRequest)successBlock
                        failBlock:(NetWorkFailRequest)failBlock;
@end
